package com.ruoyi.jpmf.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.jpmf.mapper.MfjixieappMapper;
import com.ruoyi.jpmf.domain.common.Mfjixieapp;
import com.ruoyi.jpmf.service.IMfjixieappService;
import com.ruoyi.common.core.text.Convert;

/**
 * 机械进场Service业务层处理
 * 
 * @author hxy
 * @date 2020-02-20
 */
@Service
public class MfjixieappServiceImpl implements IMfjixieappService 
{
    @Autowired
    private MfjixieappMapper mfjixieappMapper;

    /**
     * 查询机械进场
     * 
     * @param id 机械进场ID
     * @return 机械进场
     */
    @Override
    public Mfjixieapp selectMfjixieappById(Long id)
    {
        return mfjixieappMapper.selectMfjixieappById(id);
    }

    /**
     * 查询机械进场列表
     * 
     * @param mfjixieapp 机械进场
     * @return 机械进场
     */
    @Override
    public List<Mfjixieapp> selectMfjixieappList(Mfjixieapp mfjixieapp)
    {
        return mfjixieappMapper.selectMfjixieappList(mfjixieapp);
    }

    /**
     * 新增机械进场
     * 
     * @param mfjixieapp 机械进场
     * @return 结果
     */
    @Override
    public int insertMfjixieapp(Mfjixieapp mfjixieapp)
    {
        return mfjixieappMapper.insertMfjixieapp(mfjixieapp);
    }

    /**
     * 修改机械进场
     * 
     * @param mfjixieapp 机械进场
     * @return 结果
     */
    @Override
    public int updateMfjixieapp(Mfjixieapp mfjixieapp)
    {

        mfjixieapp.setUpdateTime(DateUtils.getNowDate());
        return mfjixieappMapper.updateMfjixieapp(mfjixieapp);
    }

    /**
     * 删除机械进场对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteMfjixieappByIds(String ids)
    {
        return mfjixieappMapper.deleteMfjixieappByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除机械进场信息
     * 
     * @param id 机械进场ID
     * @return 结果
     */
    public int deleteMfjixieappById(Long id)
    {
        return mfjixieappMapper.deleteMfjixieappById(id);
    }
}
